import request from "../utils/request";
/**
 *合约交易撤单
 * @returns
 */
export function stockOrderLeverCancelOrder(id) {
  return request({
    url: `/v1/stockOrderLever/cancelOrder/${id}`,
    method: "GET",
  });
}
/**
 *合约交易订单平仓
 * @returns
 */
export function stockOrderLeverClose(id) {
  return request({
    url: `/v1/stockOrderLever/close/${id}`,
    method: "GET",
  });
}
/**
 *合约交易订单详情
 * @returns
 */
export function stockOrderLeverDetails(id) {
  return request({
    url: `/v1/stockOrderLever/details/${id}`,
    method: "GET",
  });
}
/**
 *合约费率列表
 * @returns
 */
export function stockOrderLeverFeeList() {
  return request({
    url: `/v1/stockOrderLever/leverFeeList`,
    method: "GET",
  });
}
/**
 *合约下单信息
 * @returns
 */
export function stockOrderLeverInfo(stock_id) {
  return request({
    url: `/v1/stockOrderLever/leverInfo/${stock_id}`,
    method: "GET",
  });
}
/**
 * 股票合约交易下单
 * @param {*} data
 * @returns
 */
export function stockOrderLeverMakeOrder(data) {
  return request({
    url: "/v1/stockOrderLever/leverOrder",
    method: "POST",
    data,
  });
}
/**
 * 股票合约交易列表(当前持仓、当前委托、历史记录列表 状态区分)
 * @param {*} params
 * @returns
 */
export function stockOrderLeverOrderPage(params) {
  return request({
    url: "/v1/stockOrderLever/leverPage",
    method: "GET",
    params: params,
  });
}
/**
 *开通股票合约账户
 * @param {
 * } params
 * @returns
 */
export function stockOrderLeverOpenLever() {
  return request({
    url: "/v1/stockOrderLever/openLever",
    method: "GET",
  });
}
/**
 *设置止盈止损
 * @param {
 * } data
 * @returns
 */
export function stockOrderLeverSetLeverProfit(data) {
  return request({
    url: "/v1/stockOrderLever/setLeverProfit",
    method: "POST",
    data,
  });
}

/**
 *股票秒合约取消订单
 * @returns
 */
export function StockOrderSecondLeverCancelOrder(id) {
  return request({
    url: `/v1/StockOrderSecondLever/cancelOrder/${id}`,
    method: "GET",
  });
}
/**
 *股票秒合约详情
 * @returns
 */
export function StockOrderSecondLeverDetails(id) {
  return request({
    url: `/v1/StockOrderSecondLever/details/${id}`,
    method: "GET",
  });
}
/**
 *股票秒合约费率列表
 * @returns
 */
export function StockOrderSecondLeverFeeList() {
  return request({
    url: `/v1/StockOrderSecondLever/handlingFeeList`,
    method: "GET",
  });
}
/**
 *股票秒合约下单信息
 * @returns
 */
export function StockOrderSecondLeverInfo(stock_id) {
  return request({
    url: `/v1/StockOrderSecondLever/orderSecondLeverInfo/${stock_id}`,
    method: "GET",
  });
}
/**
 * 股票秒合约交易下单
 * @param {*} data
 * @returns
 */
export function StockOrderSecondLeverMakeOrder(data) {
  return request({
    url: "/v1/StockOrderSecondLever/orderSecondLever",
    method: "POST",
    data,
  });
}
/**
 * 股票秒合约交易列表(订单状态(1-当前委托，2-当前持仓，3-交易记录))
 * @param {*} params
 * @returns
 */
export function StockOrderSecondLeverOrderPage(params) {
  return request({
    url: "/v1/StockOrderSecondLever/page",
    method: "GET",
    params: params,
  });
}
